<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>

    function Person (name, age) {
      this.name = name;
      this.age = age;
      this.say = function () {
        console.log("说话");
      }
      //100个方法
    }
    var p = new Person('大漂亮', '100')
    console.log(p);
    //静态成功, 只能通过构造函数调用
    Person.sex = "男";//静态变量
    Person.eat = function () {
      console.log('吃饭');
    }
    console.log(p);
    console.log(Person.sex);
    Person.eat()
    console.log(Person);

  </script>
</body>

</html>